package sharewithus.business.dao;

import java.sql.Timestamp;
import java.util.List;
import java.util.Map;

/**
 * Title:IUserDAO
 * Description:
 * @Create_by:Vince Yu
 * @Create_date:2012-5-4
 * @Last_Edit_By:
 * @Edit_Description
 * @version:partynano 1.0
 * 
 */
public interface IUserDAO {
	
	/**
	 * Title:saveUser
	 * Description:保存用户
	 * @Create_by:Vince Yu
	 * @Create_date:2012-5-8
	 * @Last_Edit_By:
	 * @Edit_Description
	 * @Create_Version:ShareWithUs 1.0
	 */
	public int saveUser(
			String email,
			String nickname,
			String password,
			String passStrength,
			String securityEmail,
			Timestamp resTime);
	
	
	/**
	 * Title:updateUser
	 * Description:更新用户信息
	 * @Create_by:Vince Yu
	 * @Create_date:2012-5-12
	 * @Last_Edit_By:
	 * @Edit_Description
	 * @Create_Version:ShareWithUs 1.0
	 */
	public int updateUser(Map param);
	
	
	/**
	 * Title:saveUserExt
	 * Description:保存用户扩展项
	 * @Create_by:Vince Yu
	 * @Create_date:2012-5-9
	 * @Last_Edit_By:
	 * @Edit_Description
	 * @Create_Version:ShareWithUs 1.0
	 */
	public void saveUserExt(
			int userId,
			int extId,
			String extValue,
			int permission,
			int flag, 
			Timestamp lastUpdateTime);
	
	
	/**
	 * Title:deleteUserExt
	 * Description:删除用户扩展信息
	 * @Create_by:Vince Yu
	 * @Create_date:2012-5-12
	 * @Last_Edit_By:
	 * @Edit_Description
	 * @Create_Version:ShareWithUs 1.0
	 */
	@SuppressWarnings("unchecked")
	public void deleteUserExt(
			int userId);
	
	
	/**
	 * Title:checkUser
	 * Description:获取用户基础信息
	 * @param var 参数值
	 * @param type 传递参数类型，目前只支持email，nickname
	 * @Create_by:Vince Yu
	 * @Create_date:2012-5-9
	 * @Last_Edit_By:
	 * @Edit_Description
	 * @Create_Version:ShareWithUs 1.0
	 */
	public Object getUserBy(String var, String type);
	
	
	/**
	 * Title:getUserExtBy
	 * Description:获取用户扩展信息
	 * @Create_by:Vince Yu
	 * @Create_date:2012-5-9
	 * @Last_Edit_By:
	 * @Edit_Description
	 * @Create_Version:ShareWithUs 1.0
	 */
	public List getUserExtBy(String var, String type);
}